from pathlib import Path
import AiUtil

client = AiUtil.getOpenAI()

speech_file_path = Path(__file__).parent / "speech3.mp3"
response = client.audio.speech.create(
  model="tts-1-hd",
  voice="alloy",
  speed=1,
  input="你好啊"
)
response.stream_to_file(speech_file_path)



